/**
 * Copyright 2025 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.loading-container,
.no-assets-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: white;
}

.asset-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: border-color 0.2s ease-in-out;

  &:hover {
    border-color: #2d7cef;
  }

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  &.deleting {
    opacity: 0.5;
    pointer-events: none;
  }

  .delete-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20; // Higher than the delete button
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: inherit; // Match the parent's border-radius
  }

  .delete-button {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.4);
    color: black !important;
  }
}

.video-indicator {
  position: absolute;
  bottom: 4px;
  right: 4px;
  color: white;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
}

.play-indicator-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;

  .asset-item:hover & {
    opacity: 1;
  }

  .play-indicator-icon {
    width: 3rem; /* 48px */
    height: 3rem; /* 48px */
    color: rgba(255, 255, 255, 0.8);
  }
}
